<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>TMCStepper: src/source/SW_SPI.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">TMCStepper
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('_s_w___s_p_i_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">SW_SPI.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_s_w___s_p_i_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160; </div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &lt;Arduino.h&gt;</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_t_m_c__platforms_8h.html">TMC_platforms.h</a>&quot;</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160; </div>
<div class="line"><a name="l00006"></a><span class="lineno"><a class="line" href="class_s_w___s_p_i_class.html">    6</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_s_w___s_p_i_class.html">SW_SPIClass</a> {</div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;    <span class="keyword">public</span>:</div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;        <a class="code" href="class_s_w___s_p_i_class.html#abab6ad0e3672f88cb059c7885d0c4388">SW_SPIClass</a>(uint16_t sw_mosi_pin, uint16_t sw_miso_pin, uint16_t sw_sck_pin);</div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_s_w___s_p_i_class.html#aa35a68a7e184e42445f391876e58dd68">init</a>();</div>
<div class="line"><a name="l00010"></a><span class="lineno"><a class="line" href="class_s_w___s_p_i_class.html#a70ac0130662f2dd4692a922832932ce2">   10</a></span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_s_w___s_p_i_class.html#a70ac0130662f2dd4692a922832932ce2">begin</a>() {};</div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;        uint8_t <a class="code" href="class_s_w___s_p_i_class.html#af260fdc0af3f1312b106483161e559c3">transfer</a>(uint8_t ulVal);</div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;        uint16_t <a class="code" href="class_s_w___s_p_i_class.html#a1b7600aa1d9571c103718c5d3e376675">transfer16</a>(uint16_t data);</div>
<div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="class_s_w___s_p_i_class.html#ad521bec524a75beac5d81eea414a8b6b">   13</a></span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_s_w___s_p_i_class.html#ad521bec524a75beac5d81eea414a8b6b">endTransaction</a>() {};</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;    <span class="keyword">private</span>:</div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;        <span class="keyword">const</span> uint16_t  mosi_pin,</div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;                        miso_pin,</div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;                        sck_pin;</div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160; </div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">        #if defined(ARDUINO_ARCH_AVR)</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;            fastio_bm mosi_bm,</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;                    miso_bm,</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;                    sck_bm;</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;            fastio_reg mosi_register,</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;                             miso_register,</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;                             sck_register;</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">        #endif</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;};</div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aclass_s_w___s_p_i_class_html_a1b7600aa1d9571c103718c5d3e376675"><div class="ttname"><a href="class_s_w___s_p_i_class.html#a1b7600aa1d9571c103718c5d3e376675">SW_SPIClass::transfer16</a></div><div class="ttdeci">uint16_t transfer16(uint16_t data)</div><div class="ttdef"><b>Definition:</b> <a href="_s_w___s_p_i_8cpp_source.html#l00046">SW_SPI.cpp:46</a></div></div>
<div class="ttc" id="aclass_s_w___s_p_i_class_html"><div class="ttname"><a href="class_s_w___s_p_i_class.html">SW_SPIClass</a></div><div class="ttdef"><b>Definition:</b> <a href="_s_w___s_p_i_8h_source.html#l00006">SW_SPI.h:6</a></div></div>
<div class="ttc" id="aclass_s_w___s_p_i_class_html_ad521bec524a75beac5d81eea414a8b6b"><div class="ttname"><a href="class_s_w___s_p_i_class.html#ad521bec524a75beac5d81eea414a8b6b">SW_SPIClass::endTransaction</a></div><div class="ttdeci">void endTransaction()</div><div class="ttdef"><b>Definition:</b> <a href="_s_w___s_p_i_8h_source.html#l00013">SW_SPI.h:13</a></div></div>
<div class="ttc" id="aclass_s_w___s_p_i_class_html_af260fdc0af3f1312b106483161e559c3"><div class="ttname"><a href="class_s_w___s_p_i_class.html#af260fdc0af3f1312b106483161e559c3">SW_SPIClass::transfer</a></div><div class="ttdeci">uint8_t transfer(uint8_t ulVal)</div><div class="ttdef"><b>Definition:</b> <a href="_s_w___s_p_i_8cpp_source.html#l00024">SW_SPI.cpp:24</a></div></div>
<div class="ttc" id="aclass_s_w___s_p_i_class_html_aa35a68a7e184e42445f391876e58dd68"><div class="ttname"><a href="class_s_w___s_p_i_class.html#aa35a68a7e184e42445f391876e58dd68">SW_SPIClass::init</a></div><div class="ttdeci">void init()</div><div class="ttdef"><b>Definition:</b> <a href="_s_w___s_p_i_8cpp_source.html#l00009">SW_SPI.cpp:9</a></div></div>
<div class="ttc" id="a_t_m_c__platforms_8h_html"><div class="ttname"><a href="_t_m_c__platforms_8h.html">TMC_platforms.h</a></div></div>
<div class="ttc" id="aclass_s_w___s_p_i_class_html_a70ac0130662f2dd4692a922832932ce2"><div class="ttname"><a href="class_s_w___s_p_i_class.html#a70ac0130662f2dd4692a922832932ce2">SW_SPIClass::begin</a></div><div class="ttdeci">void begin()</div><div class="ttdef"><b>Definition:</b> <a href="_s_w___s_p_i_8h_source.html#l00010">SW_SPI.h:10</a></div></div>
<div class="ttc" id="aclass_s_w___s_p_i_class_html_abab6ad0e3672f88cb059c7885d0c4388"><div class="ttname"><a href="class_s_w___s_p_i_class.html#abab6ad0e3672f88cb059c7885d0c4388">SW_SPIClass::SW_SPIClass</a></div><div class="ttdeci">SW_SPIClass(uint16_t sw_mosi_pin, uint16_t sw_miso_pin, uint16_t sw_sck_pin)</div><div class="ttdef"><b>Definition:</b> <a href="_s_w___s_p_i_8cpp_source.html#l00003">SW_SPI.cpp:3</a></div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_94e7a0fbe7f8eaf7f05ee7b02c647e9f.html">source</a></li><li class="navelem"><a class="el" href="_s_w___s_p_i_8h.html">SW_SPI.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
